<?php

namespace JLPay\Models\Cashier;

use JLPay\Models\BaseRequest;

/**
 * 订单查询请求
 */
class OrderQueryRequest extends BaseRequest
{
    /**
     * API前缀
     */
    public const API_PREFIX = '/open/cashier/trans/trade';
    
    /**
     * API URI
     */
    public const API_URI = '/query';

    protected ?string $merchNo = null;
    protected ?string $outTradeNo = null;
    protected ?string $tradeNo = null;

    /**
     * 设置商户号
     *
     * @param string $merchNo
     * @return self
     */
    public function setMerchNo(string $merchNo): self
    {
        $this->merchNo = $merchNo;
        return $this;
    }

    /**
     * 设置外部交易号
     *
     * @param string $outTradeNo
     * @return self
     */
    public function setOutTradeNo(string $outTradeNo): self
    {
        $this->outTradeNo = $outTradeNo;
        return $this;
    }

    /**
     * 设置交易号
     *
     * @param string $tradeNo
     * @return self
     */
    public function setTradeNo(string $tradeNo): self
    {
        $this->tradeNo = $tradeNo;
        return $this;
    }

    /**
     * 获取商户号
     *
     * @return string|null
     */
    public function getMerchNo(): ?string
    {
        return $this->merchNo;
    }

    /**
     * 获取外部交易号
     *
     * @return string|null
     */
    public function getOutTradeNo(): ?string
    {
        return $this->outTradeNo;
    }

    /**
     * 获取交易号
     *
     * @return string|null
     */
    public function getTradeNo(): ?string
    {
        return $this->tradeNo;
    }
} 